﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Resources;
using System.Globalization;
using System.Threading;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
        Form2 form2 = new Form2();
       
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2));

        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            form2.Visible = true;
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.Icon1;
           
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Icon = null;
        }

        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }
        int i = 1;
        private void button5_Click(object sender, EventArgs e)
        {
            
           
           
                if(i == 1){

            ChangeLanguage("nl-NL");
                    i = 2;
                } else {
                      ChangeLanguage("en");
                    i = 1;
                }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];

        }

        

       
    }
}
